package homeword;

//将一个数组复刻到一个新的数组里面
public class copyArr {
    public static void main(String[] args) {
        //定义数组
        int[] arr = {1, 34, 54, 765, 75, 6345, 654, 345};
        //存储复刻后的元素
        int[] newArr = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            newArr[i] = arr[i];
        }
        for (int i = 0; i < newArr.length; i++) {
            System.out.println(newArr[i]);
        }

    }
}
